Optimal. Leaf size=30 \[ \frac{b \sec ^2(e+f x)}{2 f}-\frac{a \log (\cos (e+f x))}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0236449, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {4138, 14} \[ \frac{b \sec ^2(e+f x)}{2 f}-\frac{a \log (\cos (e+f x))}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 14
Rubi steps
\begin{align*} \int \left (a+b \sec ^2(e+f x)\right ) \tan (e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{b+a x^2}{x^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{b}{x^3}+\frac{a}{x}\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{a \log (\cos (e+f x))}{f}+\frac{b \sec ^2(e+f x)}{2 f}\\ \end{align*}
Mathematica [A] time = 0.0194704, size = 30, normalized size = 1. \[ \frac{b \sec ^2(e+f x)}{2 f}-\frac{a \log (\cos (e+f x))}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.018, size = 28, normalized size = 0.9 \begin{align*}{\frac{b \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{2\,f}}+{\frac{a\ln \left ( \sec \left ( fx+e \right ) \right ) }{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.99568, size = 45, normalized size = 1.5 \begin{align*} -\frac{a \log \left (\sin \left (f x + e\right )^{2} - 1\right ) + \frac{b}{\sin \left (f x + e\right )^{2} - 1}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.532567, size = 93, normalized size = 3.1 \begin{align*} -\frac{2 \, a \cos \left (f x + e\right )^{2} \log \left (-\cos \left (f x + e\right )\right ) - b}{2 \, f \cos \left (f x + e\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.621305, size = 42, normalized size = 1.4 \begin{align*} \begin{cases} \frac{a \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{b \sec ^{2}{\left (e + f x \right )}}{2 f} & \text{for}\: f \neq 0 \\x \left (a + b \sec ^{2}{\left (e \right )}\right ) \tan{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.42341, size = 275, normalized size = 9.17 \begin{align*} \frac{a \log \left (-\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2\right ) - a \log \left (-\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 2\right ) + \frac{a{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 2 \, a - 4 \, b}{\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]